Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • mewfin 40 posts 20 karma points
    Mar 11, 2009 @ 14:22
    mewfin
    0

    Getting Current page name [solved]

    Hey this probably is pretty easy im just very new to both umbraco and XSLT.

    [code]

  • mewfin 40 posts 20 karma points
    Mar 11, 2009 @ 15:55
    mewfin
    0

    Gonna try to be a bit more clear on what i want to do.

    I have a few categories and i want to list all the articles in the category that has the same name as the page i am in.

    ive been looking arond for a while now but i cant seem to get how i woud code a for-each where the category equals the page name.

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Mar 11, 2009 @ 23:03
    Dirk De Grave
    0

    Hi,

    And what if you'd try code snippet below?

    [code]

  • mewfin 40 posts 20 karma points
    Mar 12, 2009 @ 10:49
    mewfin
    0

    Trying that, i got:

    [code]Error occured

    System.Xml.XmlException: '<', hexadecimal value 0x3C, is an invalid attribute character. Line 52, position 17.
    at System.Xml.XmlTextReaderImpl.Throw(Exception e)
    at System.Xml.XmlTextReaderImpl.Throw(String res, String[] args)
    at System.Xml.XmlTextReaderImpl.Throw(Int32 pos, String res, String[] args)
    at System.Xml.XmlTextReaderImpl.ParseAttributeValueSlow(Int32 curPos, Char quoteChar, NodeData attr)
    at System.Xml.XmlTextReaderImpl.ParseAttributes()
    at System.Xml.XmlTextReaderImpl.ParseElement()
    at System.Xml.XmlTextReaderImpl.ParseElementContent()
    at System.Xml.XmlTextReaderImpl.Read()
    at System.Xml.Xsl.Xslt.XsltInput.ReadNextSiblingHelper()
    at System.Xml.Xsl.Xslt.XsltInput.ReadNextSibling()
    at System.Xml.Xsl.Xslt.XsltInput.MoveToNextSibling()
    at System.Xml.Xsl.Xslt.XsltLoader.LoadInstructions(List1 content, InstructionFlags flags)<br /> at System.Xml.Xsl.Xslt.XsltLoader.LoadLiteralResultElement(Boolean asStylesheet)<br /> at System.Xml.Xsl.Xslt.XsltLoader.LoadInstructions(List1 content, InstructionFlags flags)
    at System.Xml.Xsl.Xslt.XsltLoader.LoadTemplate(NsDecl stylesheetNsList)
    at System.Xml.Xsl.Xslt.XsltLoader.LoadRealStylesheet()
    at System.Xml.Xsl.Xslt.XsltLoader.LoadDocument()
    at System.Xml.Xsl.Xslt.XsltLoader.LoadStylesheet(XmlReader reader, Boolean include)[/code]


    I'm not 100% if this is the best solution but it felt like a simple one trying to create a page that lists same level nodes of one category.

    the category datatype is listboxes, with values suck as "boktips" and "motion". I want to be able to list all the articles within a specific category. so that i can create a menu on the parent node where u can choose between categories and a listing of a few articles from diffrent categories.


  • mewfin 40 posts 20 karma points
    Mar 12, 2009 @ 17:08
    mewfin
    0

    Figured out a better solution:)

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Mar 12, 2009 @ 21:46
    Dirk De Grave
    0

    Great, share it!

    Btw, error was due to a missing " at end of for-each statement and a missing closing ] sign.

    Regards,
    /Dirk

  • mewfin 40 posts 20 karma points
    Mar 16, 2009 @ 17:08
    mewfin
    0

    ah ok:) well the solution i figured out was mostly chause i learned that if i put the level = 1 it woud also look thrue all the child nodes. Anyway i still aint happy with my solution.

    Created a new thread here:
    http://forum.umbraco.org/yafpostsm42018Listing-a-category.aspx#42018

Please Sign in or register to post replies

Write your reply to:

Draft